import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class TestAnnotation {

    //定义注解

    @Target({ElementType.ANNOTATION_TYPE,ElementType.METHOD,ElementType.FIELD})
  @Retention(RetentionPolicy.SOURCE)
    @interface Best{
        //里面定义属性
        int age() default 8;
        String value() default "巴拉啦";
    }

    class TestAnno{
      @Best
        public void Eta(){

            int age;

            System.out.println("到干法时间了");
        }
}


}
